<%--
  Created by IntelliJ IDEA.
  User: 19416
  Date: 2022-11-07
  Time: 9:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
<%--    <link rel="stylesheet" href="${pageContext.request.contextPath }/statics/layui/css/layui.css" media="all">--%>
</head>
<body>
<div>
    <div style="color: red">${errorMsg}</div>
    <form class="layui-form" action="${pageContext.request.contextPath}/user/update" method="post">

        <div class="layui-form-item">
            <label class="layui-form-label">id</label>
            <div class="layui-input-block">
                <input type="text" name="id" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" id="id" value="${sysUser.id}">

            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">账号</label>
            <div class="layui-input-block">
                <input type="text" name="account" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" id="account" value="${sysUser.account}">
                <span style="color: red">${accountError}</span>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">真实姓名</label>
            <div class="layui-input-block">
                <input type="text" name="realName" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" id="realName" value="${sysUser.realName}">
                <span style="color: red">${realNameError}</span>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="text" name="password" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" id="password" value="${sysUser.password}">
                <span style="color: red">${passwordError}</span>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="radio" name="sex" value="1" ${sysUser.sex == 1 ? 'checked' : ''} title="女"  checked>
                <input type="radio" name="sex" value="2" ${sysUser.sex == 2 ? 'checked' : ''} title="男">
                <%--            <input type="radio" name="sex" value="禁" title="禁用" disabled="">--%>
            </div>
        </div>



        <div class="layui-form-item">
            <label class="layui-form-label">出生日期</label>
            <div class="layui-input-block">
                <input type="text" name="birthday" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" id="birthday"  value="<fmt:formatDate value="${sysUser.birthday}" pattern="yyyy-MM-dd"/>">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">手机号</label>
            <div class="layui-input-block">
                <input type="text" name="phone" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" id="phone" value="${sysUser.phone}">
                <span style="color: red">${phoneError}</span>

            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">角色</label>
            <div class="layui-input-inline">
                <select name="roleId"}>
                    <option value="" > 请选择角色</option>
                    <option value="1"${sysUser.roleId==1 ? 'selected' : ''}>管理系统员</option>
                    <option value="2"${sysUser.roleId==2 ? 'selected' : ''}>店长</option>
                    <option value="3"${sysUser.roleId==3 ? 'selected' : ''}>店员</option>
                    <span style="color: red">${roleIdError}</span>
                </select>

            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<%--<script src="${pageContext.request.contextPath }/statics/layui/layui.js"  charset="utf-8"></script>--%>
<%--<script>--%>
<%--    layui.use(['form', 'layedit', 'laydate'], function(){--%>
<%--        var form = layui.form--%>
<%--            ,layer = layui.layer--%>
<%--            ,layedit = layui.layedit--%>
<%--            ,laydate = layui.laydate;--%>

<%--        //创建一个编辑器--%>
<%--        var editIndex = layedit.build('LAY_demo_editor');--%>

<%--    });--%>
<%--</script>--%>

</body>
</html>




